<?php
    $MaTT = $_GET['id'];
    $tintuc = new tintucbs();
    $tintuc->MaTT = $MaTT;
    $danhsachtt = $tintuc->LayDanhSach();
    $img = $danhsachtt[0]['HinhAnh'];
    
    if($img == ""){
        $kq = $tintuc->Xoa();
        if($kq)
            header("Location: tintuc");
        else 
            alert("Lỗi truy vấn!");
    }
    else{
        ///
        $kq = $tintuc->Xoa();
        if($kq)
            header("Location: tintuc");
        else 
            alert("Lỗi truy vấn!");
    }
?>
